package day03_ThreadPool.homework;

public class Main {
    public static void main(String[] args) {
        // 单选题测试
        String[] singleOptions = {"A. 选项1", "B. 选项2", "C. 选项3", "D. 选项4"};
        SingleChoice single = new SingleChoice("这是一个单选题", singleOptions, 'B');

        System.out.println("单选题测试:");
        System.out.println("正确答案是B: " + single.checkAnswer('B')); // true
        System.out.println("错误答案是A: " + single.checkAnswer('A')); // false
        System.out.println("字符串答案B: " + single.checkAnswer("B")); // true

        // 多选题测试
        String[] multiOptions = {"A. 选项1", "B. 选项2", "C. 选项3", "D. 选项4"};
        char[] correctMultiAnswers = {'A', 'C'};
        MultiChoice multi = new MultiChoice("这是一个多选题", multiOptions, correctMultiAnswers);

        System.out.println("\n多选题测试:");
        System.out.println("正确答案是A和C: " + multi.checkAnswer(new char[]{'A', 'C'})); // true
        System.out.println("顺序不同的AC: " + multi.checkAnswer(new char[]{'C', 'A'})); // true
        System.out.println("错误答案A和B: " + multi.checkAnswer(new char[]{'A', 'B'})); // false
        System.out.println("字符串答案AC: " + multi.checkAnswer("AC")); // true
    }
}
